import React from 'react';
import ReactEcharts from 'echarts-for-react'
function barChart(props: { ydata:any,sourceList: any }) {
    const option = {
      tooltip: {
        trigger: 'axis',
      },
      xAxis: {
        axisLabel:{
          show:false
        }
        // type: 'value',
        // data: [1,2,3,4,5,6,7,8,9,10,11,12],
      },
      yAxis: {
        type: 'category',
        data:props.ydata
      },
      grid: {
        top:'8%',
        left: '20%',
        bottom:'16%',
      },
      series: props.sourceList,
    };
    
    return <ReactEcharts notMerge={true} option={option} />;
}

export default barChart;
